package com.example.demo.model;

import java.io.Serializable;
import java.util.List;

/**
 * 分页模型
 * @param <D>
 */
public class Paging<D> implements Serializable {

    private int pageNum = 1;//当前页数
    private int pageSize = 15;//每页数量
    private int totalPage;//总页数
    private long totalCount;//总记录数
    private List<D> data;//当前页数据

    public Paging() {

    }

    public Paging(int pageNum, int pageSize, int totalPage, long totalCount, List<D> data) {
        this.pageNum = pageNum;
        this.pageSize = pageSize;
        this.totalPage = totalPage;
        this.totalCount = totalCount;
        this.data = data;
    }

    public int getPageNum() {
        return pageNum;
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(int totalPage) {
        this.totalPage = totalPage;
    }

    public long getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(long totalCount) {
        this.totalCount = totalCount;
    }

    public List<D> getData() {
        return data;
    }

    public void setData(List<D> data) {
        this.data = data;
    }
}
